package com.github.kezhenxu94.crawler.source.rss;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;

/**
 * Created by kezhenxu on 12/4/16.
 *
 * @author kezhenxu (kezhenxu94@163.com)
 */
public class Rss2Channel {
    protected String title;
    protected String link;
    protected String description;

    protected Optional<String> language;
    protected Optional<String> copyright;
    protected Optional<String> managingEditor;
    protected Optional<String> webMaster;
    protected Optional<Date> pubDate;
    protected Optional<Date> lastBuildDate;
    protected Optional<String> category;
    protected Optional<String> generator;
    protected Optional<String> docs;
    protected Optional<String> cloud;
    protected Optional<Long> ttl;
    protected Optional<Rss2Image> image;
    protected Optional<String> rating;
    protected Optional<String> textInput;
    protected Optional<String> skipHours;
    protected Optional<String> skipDays;
    protected List<Rss2Item> items;

    public Rss2Channel() {
        items = new ArrayList<>(10);
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Optional<String> getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = Optional.of(language);
    }

    public Optional<String> getCopyright() {
        return copyright;
    }

    public void setCopyright(String copyright) {
        this.copyright = Optional.of(copyright);
    }

    public Optional<String> getManagingEditor() {
        return managingEditor;
    }

    public void setManagingEditor(String managingEditor) {
        this.managingEditor = Optional.of(managingEditor);
    }

    public Optional<String> getWebMaster() {
        return webMaster;
    }

    public void setWebMaster(String webMaster) {
        this.webMaster = Optional.of(webMaster);
    }

    public Optional<Date> getPubDate() {
        return pubDate;
    }

    public void setPubDate(Date pubDate) {
        this.pubDate = Optional.of(pubDate);
    }

    public Optional<Date> getLastBuildDate() {
        return lastBuildDate;
    }

    public void setLastBuildDate(Date lastBuildDate) {
        this.lastBuildDate = Optional.of(lastBuildDate);
    }

    public Optional<String> getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = Optional.of(category);
    }

    public Optional<String> getGenerator() {
        return generator;
    }

    public void setGenerator(String generator) {
        this.generator = Optional.of(generator);
    }

    public Optional<String> getDocs() {
        return docs;
    }

    public void setDocs(String docs) {
        this.docs = Optional.of(docs);
    }

    public Optional<String> getCloud() {
        return cloud;
    }

    public void setCloud(String cloud) {
        this.cloud = Optional.of(cloud);
    }

    public Optional<Long> getTtl() {
        return ttl;
    }

    public void setTtl(Long ttl) {
        this.ttl = Optional.of(ttl);
    }

    public Optional<Rss2Image> getImage() {
        return image;
    }

    public void setImage(Rss2Image image) {
        this.image = Optional.of(image);
    }

    public Optional<String> getRating() {
        return rating;
    }

    public void setRating(String rating) {
        this.rating = Optional.of(rating);
    }

    public Optional<String> getTextInput() {
        return textInput;
    }

    public void setTextInput(String textInput) {
        this.textInput = Optional.of(textInput);
    }

    public Optional<String> getSkipHours() {
        return skipHours;
    }

    public void setSkipHours(String skipHours) {
        this.skipHours = Optional.of(skipHours);
    }

    public Optional<String> getSkipDays() {
        return skipDays;
    }

    public void setSkipDays(String skipDays) {
        this.skipDays = Optional.of(skipDays);
    }

    public List<Rss2Item> getItems() {
        return items;
    }

    public void setItems(List<Rss2Item> items) {
        this.items = items;
    }

    @Override
    public String toString() {
        return "Rss2Channel{" +
                "title='" + title + '\'' +
                ", link='" + link + '\'' +
                ", description='" + description + '\'' +
                ", language=" + language +
                ", copyright=" + copyright +
                ", managingEditor=" + managingEditor +
                ", webMaster=" + webMaster +
                ", pubDate=" + pubDate +
                ", lastBuildDate=" + lastBuildDate +
                ", category=" + category +
                ", generator=" + generator +
                ", docs=" + docs +
                ", cloud=" + cloud +
                ", ttl=" + ttl +
                ", image=" + image +
                ", rating=" + rating +
                ", textInput=" + textInput +
                ", skipHours=" + skipHours +
                ", skipDays=" + skipDays +
                ", items=" + items +
                '}';
    }
}
